package net.zjitc.controller;

import net.zjitc.pojo.User;
import net.zjitc.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
//通过调用userController.findAll()--->所有的用户信息
import java.util.List;

@Controller
public class UserController {
    @Autowired
    private UserService userService;
    public List<User> findAll(){
       return userService.findAll();
    }
    public int addUser(User user){
        return  userService.addUser(user);
    }
}
